package com.sir.tao.carhire.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sir.tao.carhire.dao.CarDao;
import com.sir.tao.carhire.entity.table.CarEntity;
import com.sir.tao.carhire.service.CarService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author dyy
 * @data 2022/1/12 10:47
 * @description:
 */
@Service
public class CarServiceImpl extends ServiceImpl<CarDao, CarEntity> implements CarService {


    @Resource
    private CarDao carDao;

    @Override
    public int add(CarEntity carEntity) {
        return carDao.add(carEntity);
    }

    @Override
    public List<CarEntity> getAllCar() {
        return carDao.getAllCar();
    }

    @Override
    public int delete(String id) {
        return carDao.delete(id);
    }

    @Override
    public int update(CarEntity carEntity) {
        return carDao.update(carEntity);
    }

    @Override
    public List<CarEntity> getAllCarByType(String carTypeId) {
        return carDao.getAllCarByType(carTypeId);
    }


    @Override
    public int carReturn(String carId) {
        return carDao.carReturn(carId);
    }


    @Override
    public int receiveCar(String carId) {
        return carDao.receiveCar(carId);
    }

}
